package com.ytxg.news.controller;


import com.ytxg.news.dto.NewsInfoRespDto;
import com.ytxg.core.dto.RestResp;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ytxg.news.service.INewsService;

import java.util.List;

@RestController
@RequestMapping("/api/front/news")
public class NewsController {

    @Resource
    private INewsService iNewsService;



    @GetMapping("latest_list")
    public RestResp<List<NewsInfoRespDto>> latestList(){

        RestResp<List<NewsInfoRespDto>> latestList = iNewsService.getLatestList();
        return latestList;
    }


}
